<template>
  <div class="reportFormPage">
    <div class="report-dom">
      <el-row>
        <el-col :span="5" :offset="19">
          <div class="pageNumBox">
            <span>第</span>
            <span class="placeholder-min text-center">&nbsp;{{ form.page }}&nbsp;</span>
            <span>页，共</span>
            <span class="placeholder-min text-center">&nbsp;{{ form.totalPage }}&nbsp;</span>
            <span>页</span>
          </div>
        </el-col>
      </el-row>
      <div class="topTwoBox">
        <div class="centerName">路基路面厚度测试试验检测记录表</div>
        <div class="codeText">
          <tr>
            JGLP01005F
          </tr>
        </div>
      </div>
      <div class="threeTopBox">
        <div class="left-border">
          <div class="box-title">检测单位名称：</div>
          <div class>{{ form.jiancdwmc }}</div>
        </div>
        <div class="right-border">
          <span>记录编号：</span>
          <span class="placeholder">{{ form.jilbh }}</span>
        </div>
      </div>
      <div class="table-border">
        <!-- .........................1111111111111111111111111111111......................................................... -->
        <table height="220px" class="top-table">
          <tbody>
            <tr>
              <td height="30" align="center" width="15%">
                <span style="width: 90px; display: inline-block">工程名称</span>
              </td>
              <td width="35%" class="text-center">
                <span>{{ form.gongcmc }}</span>
              </td>
              <td align="center" width="15%">
                <span style="width: 90px; display: inline-block">工程部位/用途</span>
              </td>
              <td width="35%" class="text-center">
                <span>{{ form.gongcbwyt }}</span>
              </td>
            </tr>
            <tr>
              <td height="50" align="center">样品信息</td>
              <td class="specimen-border" colspan="3">
                <span>样品名称：</span>
                <span :class="{ placeholder: !form.yangpmc }">{{ form.yangpmc }}</span>
                <span>；样品编号：</span>
                <span :class="{ 'placeholder-long': !form.yangpbh }">{{ form.yangpbh }}</span>
                <span>；样品数量：</span>
                <span :class="{ placeholder: !form.yangpsl }">{{ form.yangpsl }}</span>
                <span>；样品状态：</span>
                <span :class="{ placeholder: !form.yangpzt }">{{ form.yangpzt }}</span>
                <span>；来样时间：</span>
                <span :class="{ placeholder: !form.yangpsj }">{{ form.yangpsj }}</span>
              </td>
            </tr>

            <tr>
              <td height="25" align="center" width="15%">
                <span style="width: 90px; display: inline-block">试验检测日期</span>
              </td>
               <!-- <td width="35%" class="text-center">{{ form.shiyjcrq }}</td> -->                                            
 <td width="35%" class="text-center">
      <el-input v-model="form.shiyjcrq" />
</td>
              <td align="center" width="15%">
                <span style="width: 90px; display: inline-block">试验条件</span>
              </td>
              <td width="35%">
                <el-input v-model="form.shiytj" />
              </td>
            </tr>

            <tr>
              <td height="50" align="center" width="15%">
                <span style="width: 90px; display: inline-block">检测依据</span>
              </td>
              <td width="35%">
                <span v-if="isPdf">{{ form.jiancyj }}</span>
                <el-input v-else type="textarea" v-model="form.jiancyj" :rows="2" class="mark" @dblclick.native="showBsJiancyjView" readonly />
              </td>
              <td align="center" width="15%">
                <span style="width: 90px; display: inline-block">判定依据</span>
              </td>
              <td width="35%">
                <span v-if="isPdf">{{ form.pandyj }}</span>
                <el-input v-else type="textarea" v-model="form.pandyj" :rows="2" @dblclick.native="showBsJudgeBaseView" @focus="handleFocus('pandyj')" class="mark" />
              </td>
            </tr>
            <tr class="bottom-border">
              <td height="50" align="center">
                <div>主要仪器设备</div>
                <div>名称及编号</div>
              </td>
              <td colspan="3">
                <span v-if="isPdf">{{ form.zhuyyqsbmcjbh }}</span>
                <el-input v-else type="textarea" :rows="2" v-model="form.zhuyyqsbmcjbh" class="height100 width100 mark" @dblclick.native="showBsInstrumentView" readonly></el-input>
              </td>
            </tr>
          </tbody>
        </table>
        <!-- .................................22222222222222222222222222222222............................................... -->
        <table height="616px" class="middle-table">
          <tbody>
            <tr height="25">
              <td colspan="2">厚度设计值(mm)</td>
              <td colspan="6"><el-input type="number" v-model="form.houdsjz" @blur="houdsjzChange()" @keydown.native="handleKeyDown($event, 0, 0)" :ref="'0_0'" /></td>
              <td colspan="2">允许偏差(mm)</td>
              <td colspan="6"><el-input type="number" v-model="form.yunxpc" @blur="yunxpcChange()" @keydown.native="handleKeyDown($event, 0, 1)" :ref="'0_1'" /></td>
            </tr>
            <tr height="25">
              <td rowspan="2" class="td2">测点桩号</td>
              <td rowspan="2" class="td2">测点位置</td>
              <td colspan="5" class="td5">厚度(mm)</td>
              <td rowspan="2" class="td2">偏差(mm)</td>
              <td rowspan="2" class="td2">测点桩号</td>
              <td rowspan="2" class="td2">测点位置</td>
              <td colspan="5" class="td5">厚度(mm)</td>
              <td rowspan="2" class="td2">偏差(mm)</td>
            </tr>
            <tr height="25">
              <td colspan="4">实测厚度</td>
              <td>平均值</td>
              <td colspan="4">实测厚度</td>
              <td>平均值</td>
            </tr>
            <tr height="25">
              <td class="td2">
                <el-input type="text" v-model="form.detailList[0].shijbh" @keydown.native="handleKeyDown($event, 1, 0)" :ref="'1_0'" />
              </td>
              <td class="td2">
                <el-input type="text" v-model="form.detailList[0].qvywz" @keydown.native="handleKeyDown($event, 1, 1)" :ref="'1_1'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[0].shichd1" @blur="calculatePingjz(0)" @keydown.native="handleKeyDown($event, 1, 2)" :ref="'1_2'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[0].shichd2" @blur="calculatePingjz(0)" @keydown.native="handleKeyDown($event, 1, 3)" :ref="'1_3'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[0].shichd3" @blur="calculatePingjz(0)" @keydown.native="handleKeyDown($event, 1, 4)" :ref="'1_4'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[0].shichd4" @blur="calculatePingjz(0)" @keydown.native="handleKeyDown($event, 1, 5)" :ref="'1_5'" />
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[0].pingjz" disabled />
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[0].pianc" disabled />
              </td>
              <td class="td2">
                <el-input type="text" v-model="form.detailList[1].shijbh" @keydown.native="handleKeyDown($event, 1, 6)" :ref="'1_6'" />
              </td>
              <td class="td2">
                <el-input type="text" v-model="form.detailList[1].qvywz" @keydown.native="handleKeyDown($event, 1, 7)" :ref="'1_7'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[1].shichd1" @blur="calculatePingjz(1)" @keydown.native="handleKeyDown($event, 1, 8)" :ref="'1_8'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[1].shichd2" @blur="calculatePingjz(1)" @keydown.native="handleKeyDown($event, 1, 9)" :ref="'1_9'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[1].shichd3" @blur="calculatePingjz(1)" @keydown.native="handleKeyDown($event, 1, 10)" :ref="'1_10'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[1].shichd4" @blur="calculatePingjz(1)" @keydown.native="handleKeyDown($event, 1, 11)" :ref="'1_11'" />
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[1].pingjz" disabled />
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[1].pianc" disabled />
              </td>
            </tr>
            <tr height="25">
              <td class="td2">
                <el-input type="text" v-model="form.detailList[2].shijbh" @keydown.native="handleKeyDown($event, 2, 0)" :ref="'2_0'" />
              </td>
              <td class="td2">
                <el-input type="text" v-model="form.detailList[2].qvywz" @keydown.native="handleKeyDown($event, 2, 1)" :ref="'2_1'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[2].shichd1" @blur="calculatePingjz(2)" @keydown.native="handleKeyDown($event, 2, 2)" :ref="'2_2'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[2].shichd2" @blur="calculatePingjz(2)" @keydown.native="handleKeyDown($event, 2, 3)" :ref="'2_3'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[2].shichd3" @blur="calculatePingjz(2)" @keydown.native="handleKeyDown($event, 2, 4)" :ref="'2_4'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[2].shichd4" @blur="calculatePingjz(2)" @keydown.native="handleKeyDown($event, 2, 5)" :ref="'2_5'" />
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[2].pingjz" disabled />
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[2].pianc" disabled />
              </td>
              <td class="td2">
                <el-input type="text" v-model="form.detailList[3].shijbh" @keydown.native="handleKeyDown($event, 2, 6)" :ref="'2_6'" />
              </td>
              <td class="td2">
                <el-input type="text" v-model="form.detailList[3].qvywz" @keydown.native="handleKeyDown($event, 2, 7)" :ref="'2_7'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[3].shichd1" @blur="calculatePingjz(3)" @keydown.native="handleKeyDown($event, 2, 8)" :ref="'2_8'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[3].shichd2" @blur="calculatePingjz(3)" @keydown.native="handleKeyDown($event, 2, 9)" :ref="'2_9'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[3].shichd3" @blur="calculatePingjz(3)" @keydown.native="handleKeyDown($event, 2, 10)" :ref="'2_10'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[3].shichd4" @blur="calculatePingjz(3)" @keydown.native="handleKeyDown($event, 2, 11)" :ref="'2_11'" />
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[3].pingjz" disabled />
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[3].pianc" disabled />
              </td>
            </tr>
            <tr height="25">
              <td class="td2">
                <el-input type="text" v-model="form.detailList[4].shijbh" @keydown.native="handleKeyDown($event, 3, 0)" :ref="'3_0'" />
              </td>
              <td class="td2">
                <el-input type="text" v-model="form.detailList[4].qvywz" @keydown.native="handleKeyDown($event, 3, 1)" :ref="'3_1'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[4].shichd1" @blur="calculatePingjz(4)" @keydown.native="handleKeyDown($event, 3, 2)" :ref="'3_2'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[4].shichd2" @blur="calculatePingjz(4)" @keydown.native="handleKeyDown($event, 3, 3)" :ref="'3_3'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[4].shichd3" @blur="calculatePingjz(4)" @keydown.native="handleKeyDown($event, 3, 4)" :ref="'3_4'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[4].shichd4" @blur="calculatePingjz(4)" @keydown.native="handleKeyDown($event, 3, 5)" :ref="'3_5'" />
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[4].pingjz" disabled />
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[4].pianc" disabled />
              </td>
              <td class="td2">
                <el-input type="text" v-model="form.detailList[5].shijbh" @keydown.native="handleKeyDown($event, 3, 6)" :ref="'3_6'" />
              </td>
              <td class="td2">
                <el-input type="text" v-model="form.detailList[5].qvywz" @keydown.native="handleKeyDown($event, 3, 7)" :ref="'3_7'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[5].shichd1" @blur="calculatePingjz(5)" @keydown.native="handleKeyDown($event, 3, 8)" :ref="'3_8'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[5].shichd2" @blur="calculatePingjz(5)" @keydown.native="handleKeyDown($event, 3, 9)" :ref="'3_9'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[5].shichd3" @blur="calculatePingjz(5)" @keydown.native="handleKeyDown($event, 3, 10)" :ref="'3_10'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[5].shichd4" @blur="calculatePingjz(5)" @keydown.native="handleKeyDown($event, 3, 11)" :ref="'3_11'" />
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[5].pingjz" disabled />
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[5].pianc" disabled />
              </td>
            </tr>
            <tr height="25">
              <td class="td2">
                <el-input type="text" v-model="form.detailList[6].shijbh" @keydown.native="handleKeyDown($event, 4, 0)" :ref="'4_0'" />
              </td>
              <td class="td2">
                <el-input type="text" v-model="form.detailList[6].qvywz" @keydown.native="handleKeyDown($event, 4, 1)" :ref="'4_1'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[6].shichd1" @blur="calculatePingjz(6)" @keydown.native="handleKeyDown($event, 4, 2)" :ref="'4_2'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[6].shichd2" @blur="calculatePingjz(6)" @keydown.native="handleKeyDown($event, 4, 3)" :ref="'4_3'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[6].shichd3" @blur="calculatePingjz(6)" @keydown.native="handleKeyDown($event, 4, 4)" :ref="'4_4'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[6].shichd4" @blur="calculatePingjz(6)" @keydown.native="handleKeyDown($event, 4, 5)" :ref="'4_5'" />
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[6].pingjz" disabled />
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[6].pianc" disabled />
              </td>
              <td class="td2">
                <el-input type="text" v-model="form.detailList[7].shijbh" @keydown.native="handleKeyDown($event, 4, 6)" :ref="'4_6'" />
              </td>
              <td class="td2">
                <el-input type="text" v-model="form.detailList[7].qvywz" @keydown.native="handleKeyDown($event, 4, 7)" :ref="'4_7'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[7].shichd1" @blur="calculatePingjz(7)" @keydown.native="handleKeyDown($event, 4, 8)" :ref="'4_8'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[7].shichd2" @blur="calculatePingjz(7)" @keydown.native="handleKeyDown($event, 4, 9)" :ref="'4_9'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[7].shichd3" @blur="calculatePingjz(7)" @keydown.native="handleKeyDown($event, 4, 10)" :ref="'4_10'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[7].shichd4" @blur="calculatePingjz(7)" @keydown.native="handleKeyDown($event, 4, 11)" :ref="'4_11'" />
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[7].pingjz" disabled />
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[7].pianc" disabled />
              </td>
            </tr>
            <tr height="25">
              <td class="td2">
                <el-input type="text" v-model="form.detailList[8].shijbh" @keydown.native="handleKeyDown($event, 5, 0)" :ref="'5_0'" />
              </td>
              <td class="td2">
                <el-input type="text" v-model="form.detailList[8].qvywz" @keydown.native="handleKeyDown($event, 5, 1)" :ref="'5_1'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[8].shichd1" @blur="calculatePingjz(8)" @keydown.native="handleKeyDown($event, 5, 2)" :ref="'5_2'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[8].shichd2" @blur="calculatePingjz(8)" @keydown.native="handleKeyDown($event, 5, 3)" :ref="'5_3'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[8].shichd3" @blur="calculatePingjz(8)" @keydown.native="handleKeyDown($event, 5, 4)" :ref="'5_4'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[8].shichd4" @blur="calculatePingjz(8)" @keydown.native="handleKeyDown($event, 5, 5)" :ref="'5_5'" />
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[8].pingjz" disabled />
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[8].pianc" disabled />
              </td>
              <td class="td2">
                <el-input type="text" v-model="form.detailList[9].shijbh" @keydown.native="handleKeyDown($event, 5, 6)" :ref="'5_6'" />
              </td>
              <td class="td2">
                <el-input type="text" v-model="form.detailList[9].qvywz" @keydown.native="handleKeyDown($event, 5, 7)" :ref="'5_7'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[9].shichd1" @blur="calculatePingjz(9)" @keydown.native="handleKeyDown($event, 5, 8)" :ref="'5_8'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[9].shichd2" @blur="calculatePingjz(9)" @keydown.native="handleKeyDown($event, 5, 9)" :ref="'5_9'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[9].shichd3" @blur="calculatePingjz(9)" @keydown.native="handleKeyDown($event, 5, 10)" :ref="'5_10'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[9].shichd4" @blur="calculatePingjz(9)" @keydown.native="handleKeyDown($event, 5, 11)" :ref="'5_11'" />
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[9].pingjz" disabled />
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[9].pianc" disabled />
              </td>
            </tr>
            <tr height="25">
              <td class="td2">
                <el-input type="text" v-model="form.detailList[10].shijbh" @keydown.native="handleKeyDown($event, 6, 0)" :ref="'6_0'" />
              </td>
              <td class="td2">
                <el-input type="text" v-model="form.detailList[10].qvywz" @keydown.native="handleKeyDown($event, 6, 1)" :ref="'6_1'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[10].shichd1" @blur="calculatePingjz(10)" @keydown.native="handleKeyDown($event, 6, 2)" :ref="'6_2'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[10].shichd2" @blur="calculatePingjz(10)" @keydown.native="handleKeyDown($event, 6, 3)" :ref="'6_3'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[10].shichd3" @blur="calculatePingjz(10)" @keydown.native="handleKeyDown($event, 6, 4)" :ref="'6_4'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[10].shichd4" @blur="calculatePingjz(10)" @keydown.native="handleKeyDown($event, 6, 5)" :ref="'6_5'" />
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[10].pingjz" disabled />
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[10].pianc" disabled />
              </td>
              <td class="td2">
                <el-input type="text" v-model="form.detailList[11].shijbh" @keydown.native="handleKeyDown($event, 6, 6)" :ref="'6_6'" />
              </td>
              <td class="td2">
                <el-input type="text" v-model="form.detailList[11].qvywz" @keydown.native="handleKeyDown($event, 6, 7)" :ref="'6_7'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[11].shichd1" @blur="calculatePingjz(11)" @keydown.native="handleKeyDown($event, 6, 8)" :ref="'6_8'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[11].shichd2" @blur="calculatePingjz(11)" @keydown.native="handleKeyDown($event, 6, 9)" :ref="'6_9'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[11].shichd3" @blur="calculatePingjz(11)" @keydown.native="handleKeyDown($event, 6, 10)" :ref="'6_10'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[11].shichd4" @blur="calculatePingjz(11)" @keydown.native="handleKeyDown($event, 6, 11)" :ref="'6_11'" />
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[11].pingjz" disabled />
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[11].pianc" disabled />
              </td>
            </tr>
            <tr height="25">
              <td class="td2">
                <el-input type="text" v-model="form.detailList[12].shijbh" @keydown.native="handleKeyDown($event, 7, 0)" :ref="'7_0'" />
              </td>
              <td class="td2">
                <el-input type="text" v-model="form.detailList[12].qvywz"  @keydown.native="handleKeyDown($event, 7, 1)" :ref="'7_1'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[12].shichd1" @blur="calculatePingjz(12)"  @keydown.native="handleKeyDown($event, 7, 2)" :ref="'7_2'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[12].shichd2" @blur="calculatePingjz(12)"  @keydown.native="handleKeyDown($event, 7, 3)" :ref="'7_3'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[12].shichd3" @blur="calculatePingjz(12)"  @keydown.native="handleKeyDown($event, 7, 4)" :ref="'7_4'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[12].shichd4" @blur="calculatePingjz(12)"  @keydown.native="handleKeyDown($event, 7, 5)" :ref="'7_5'" />
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[12].pingjz" disabled />
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[12].pianc" disabled />
              </td>
              <td class="td2">
                <el-input type="text" v-model="form.detailList[13].shijbh" @keydown.native="handleKeyDown($event, 7, 6)" :ref="'7_6'"  />
              </td>
              <td class="td2">
                <el-input type="text" v-model="form.detailList[13].qvywz"  @keydown.native="handleKeyDown($event, 7, 7)" :ref="'7_7'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[13].shichd1" @blur="calculatePingjz(13)"  @keydown.native="handleKeyDown($event, 7, 8)" :ref="'7_8'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[13].shichd2" @blur="calculatePingjz(13)"  @keydown.native="handleKeyDown($event, 7, 9)" :ref="'7_9'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[13].shichd3" @blur="calculatePingjz(13)"  @keydown.native="handleKeyDown($event, 7, 10)" :ref="'7_10'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[13].shichd4" @blur="calculatePingjz(13)"  @keydown.native="handleKeyDown($event, 7, 11)" :ref="'7_11'" />
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[13].pingjz" disabled />
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[13].pianc" disabled />
              </td>
            </tr>
            <tr height="25">
              <td class="td2">
                <el-input type="text" v-model="form.detailList[14].shijbh"  @keydown.native="handleKeyDown($event, 8, 0)" :ref="'8_0'" />
              </td>
              <td class="td2">
                <el-input type="text" v-model="form.detailList[14].qvywz"  @keydown.native="handleKeyDown($event, 8, 1)" :ref="'8_1'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[14].shichd1" @blur="calculatePingjz(14)"  @keydown.native="handleKeyDown($event, 8, 2)" :ref="'8_2'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[14].shichd2" @blur="calculatePingjz(14)"  @keydown.native="handleKeyDown($event, 8, 3)" :ref="'8_3'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[14].shichd3" @blur="calculatePingjz(14)"  @keydown.native="handleKeyDown($event, 8, 4)" :ref="'8_4'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[14].shichd4" @blur="calculatePingjz(14)"  @keydown.native="handleKeyDown($event, 8, 5)" :ref="'8_5'" />
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[14].pingjz" disabled />
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[14].pianc" disabled />
              </td>
              <td class="td2">
                <el-input type="text" v-model="form.detailList[15].shijbh"  @keydown.native="handleKeyDown($event, 8, 6)" :ref="'8_6'" />
              </td>
              <td class="td2">
                <el-input type="text" v-model="form.detailList[15].qvywz"  @keydown.native="handleKeyDown($event, 8, 7)" :ref="'8_7'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[15].shichd1" @blur="calculatePingjz(15)"   @keydown.native="handleKeyDown($event, 8, 8)" :ref="'8_8'"/>
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[15].shichd2" @blur="calculatePingjz(15)"   @keydown.native="handleKeyDown($event, 8, 9)" :ref="'8_9'"/>
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[15].shichd3" @blur="calculatePingjz(15)"   @keydown.native="handleKeyDown($event, 8, 10)" :ref="'8_10'"/>
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[15].shichd4" @blur="calculatePingjz(15)"   @keydown.native="handleKeyDown($event, 8, 11)" :ref="'8_11'"/>
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[15].pingjz" disabled />
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[15].pianc" disabled />
              </td>
            </tr>
            <tr height="25">
              <td class="td2">
                <el-input type="text" v-model="form.detailList[16].shijbh"  @keydown.native="handleKeyDown($event, 9, 0)" :ref="'9_0'" />
              </td>
              <td class="td2">
                <el-input type="text" v-model="form.detailList[16].qvywz"  @keydown.native="handleKeyDown($event, 9, 1)" :ref="'9_1'"  />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[16].shichd1" @blur="calculatePingjz(16)"   @keydown.native="handleKeyDown($event, 9, 2)" :ref="'9_2'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[16].shichd2" @blur="calculatePingjz(16)"   @keydown.native="handleKeyDown($event, 9, 3)" :ref="'9_3'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[16].shichd3" @blur="calculatePingjz(16)"   @keydown.native="handleKeyDown($event, 9, 4)" :ref="'9_4'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[16].shichd4" @blur="calculatePingjz(16)"  @keydown.native="handleKeyDown($event, 9, 5)" :ref="'9_5'"  />
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[16].pingjz" disabled />
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[16].pianc" disabled />
              </td>
              <td class="td2">
                <el-input type="text" v-model="form.detailList[17].shijbh"   @keydown.native="handleKeyDown($event, 9, 6)" :ref="'9_6'" />
              </td>
              <td class="td2">
                <el-input type="text" v-model="form.detailList[17].qvywz"   @keydown.native="handleKeyDown($event, 9, 7)" :ref="'9_7'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[17].shichd1" @blur="calculatePingjz(17)"  @keydown.native="handleKeyDown($event, 9, 8)" :ref="'9_8'"  />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[17].shichd2" @blur="calculatePingjz(17)"   @keydown.native="handleKeyDown($event, 9, 9)" :ref="'9_9'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[17].shichd3" @blur="calculatePingjz(17)"   @keydown.native="handleKeyDown($event, 9, 10)" :ref="'9_10'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[17].shichd4" @blur="calculatePingjz(17)"  @keydown.native="handleKeyDown($event, 9, 11)" :ref="'9_11'"  />
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[17].pingjz" disabled />
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[17].pianc" disabled />
              </td>
            </tr>
            <tr height="25">
              <td class="td2">
                <el-input type="text" v-model="form.detailList[18].shijbh"   @keydown.native="handleKeyDown($event, 10, 0)" :ref="'10_0'" />
              </td>
              <td class="td2">
                <el-input type="text" v-model="form.detailList[18].qvywz"   @keydown.native="handleKeyDown($event, 10, 1)" :ref="'10_1'"/>
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[18].shichd1" @blur="calculatePingjz(18)"   @keydown.native="handleKeyDown($event, 10, 2)" :ref="'10_2'"/>
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[18].shichd2" @blur="calculatePingjz(18)"   @keydown.native="handleKeyDown($event, 10, 3)" :ref="'10_3'"/>
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[18].shichd3" @blur="calculatePingjz(18)"  @keydown.native="handleKeyDown($event, 10, 4)" :ref="'10_4'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[18].shichd4" @blur="calculatePingjz(18)"   @keydown.native="handleKeyDown($event, 10, 5)" :ref="'10_5'"/>
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[18].pingjz" disabled />
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[18].pianc" disabled />
              </td>
              <td class="td2">
                <el-input type="text" v-model="form.detailList[19].shijbh"   @keydown.native="handleKeyDown($event, 10, 6)" :ref="'10_6'"/>
              </td>
              <td class="td2">
                <el-input type="text" v-model="form.detailList[19].qvywz"   @keydown.native="handleKeyDown($event, 10, 7)" :ref="'10_7'"/>
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[19].shichd1" @blur="calculatePingjz(19)"   @keydown.native="handleKeyDown($event, 10, 8)" :ref="'10_8'"/>
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[19].shichd2" @blur="calculatePingjz(19)"   @keydown.native="handleKeyDown($event, 10, 9)" :ref="'10_9'"/>
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[19].shichd3" @blur="calculatePingjz(19)"   @keydown.native="handleKeyDown($event, 10, 10)" :ref="'10_10'"/>
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[19].shichd4" @blur="calculatePingjz(19)"   @keydown.native="handleKeyDown($event, 10, 11)" :ref="'10_11'"/>
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[19].pingjz" disabled />
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[19].pianc" disabled />
              </td>
            </tr>
            <tr height="25">
              <td class="td2">
                <el-input type="text" v-model="form.detailList[20].shijbh"   @keydown.native="handleKeyDown($event, 11, 0)" :ref="'11_0'"/>
              </td>
              <td class="td2">
                <el-input type="text" v-model="form.detailList[20].qvywz" @keydown.native="handleKeyDown($event, 11, 1)" :ref="'11_1'"/>
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[20].shichd1" @blur="calculatePingjz(20)"  @keydown.native="handleKeyDown($event, 11, 2)" :ref="'11_2'"/>
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[20].shichd2" @blur="calculatePingjz(20)"  @keydown.native="handleKeyDown($event, 11, 3)" :ref="'11_3'"/>
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[20].shichd3" @blur="calculatePingjz(20)" @keydown.native="handleKeyDown($event, 11, 4)" :ref="'11_4'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[20].shichd4" @blur="calculatePingjz(20)"  @keydown.native="handleKeyDown($event, 11, 5)" :ref="'11_5'"/>
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[20].pingjz" disabled />
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[20].pianc" disabled />
              </td>
              <td class="td2">
                <el-input type="text" v-model="form.detailList[21].shijbh" @keydown.native="handleKeyDown($event, 11, 6)" :ref="'11_6'" />
              </td>
              <td class="td2">
                <el-input type="text" v-model="form.detailList[21].qvywz"  @keydown.native="handleKeyDown($event, 11, 7)" :ref="'11_7'"/>
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[21].shichd1" @blur="calculatePingjz(21)" @keydown.native="handleKeyDown($event, 11, 8)" :ref="'11_8'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[21].shichd2" @blur="calculatePingjz(21)" @keydown.native="handleKeyDown($event, 11, 9)" :ref="'11_9'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[21].shichd3" @blur="calculatePingjz(21)" @keydown.native="handleKeyDown($event, 11, 10)" :ref="'11_10'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[21].shichd4" @blur="calculatePingjz(21)" @keydown.native="handleKeyDown($event, 11, 11)" :ref="'11_11'" />
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[21].pingjz" disabled />
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[21].pianc" disabled />
              </td>
            </tr>
            <tr height="25">
              <td class="td2">
                <el-input type="text" v-model="form.detailList[22].shijbh"  @keydown.native="handleKeyDown($event, 12, 0)" :ref="'12_0'"/>
              </td>
              <td class="td2">
                <el-input type="text" v-model="form.detailList[22].qvywz"  @keydown.native="handleKeyDown($event, 12, 1)" :ref="'12_1'"/>
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[22].shichd1" @blur="calculatePingjz(22)"  @keydown.native="handleKeyDown($event, 12, 2)" :ref="'12_2'"/>
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[22].shichd2" @blur="calculatePingjz(22)"  @keydown.native="handleKeyDown($event, 12, 3)" :ref="'12_3'"/>
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[22].shichd3" @blur="calculatePingjz(22)"  @keydown.native="handleKeyDown($event, 12, 4)" :ref="'12_4'"/>
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[22].shichd4" @blur="calculatePingjz(22)"  @keydown.native="handleKeyDown($event, 12, 5)" :ref="'12_5'"/>
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[22].pingjz" disabled />
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[22].pianc" disabled />
              </td>
              <td class="td2">
                <el-input type="text" v-model="form.detailList[23].shijbh" @keydown.native="handleKeyDown($event, 12, 6)" :ref="'12_6'" />
              </td>
              <td class="td2">
                <el-input type="text" v-model="form.detailList[23].qvywz"  @keydown.native="handleKeyDown($event, 12, 7)" :ref="'12_7'"/>
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[23].shichd1" @blur="calculatePingjz(23)"  @keydown.native="handleKeyDown($event, 12, 8)" :ref="'12_8'"/>
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[23].shichd2" @blur="calculatePingjz(23)"  @keydown.native="handleKeyDown($event, 12, 9)" :ref="'12_9'"/>
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[23].shichd3" @blur="calculatePingjz(23)"  @keydown.native="handleKeyDown($event, 12, 10)" :ref="'12_10'"/>
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[23].shichd4" @blur="calculatePingjz(23)"  @keydown.native="handleKeyDown($event, 12, 11)" :ref="'12_11'"/>
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[23].pingjz" disabled />
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[23].pianc" disabled />
              </td>
            </tr>
            <tr height="25">
              <td class="td2">
                <el-input type="text" v-model="form.detailList[24].shijbh"  @keydown.native="handleKeyDown($event, 13, 0)" :ref="'13_0'"/>
              </td>
              <td class="td2">
                <el-input type="text" v-model="form.detailList[24].qvywz"   @keydown.native="handleKeyDown($event, 13, 1)" :ref="'13_1'"/>
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[24].shichd1" @blur="calculatePingjz(24)" @keydown.native="handleKeyDown($event, 13, 2)" :ref="'13_2'"/>
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[24].shichd2" @blur="calculatePingjz(24)" @keydown.native="handleKeyDown($event, 13, 3)" :ref="'13_3'"/>
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[24].shichd3" @blur="calculatePingjz(24)" @keydown.native="handleKeyDown($event, 13, 4)" :ref="'13_4'"/>
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[24].shichd4" @blur="calculatePingjz(24)" @keydown.native="handleKeyDown($event, 13, 5)" :ref="'13_5'" />
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[24].pingjz" disabled />
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[24].pianc" disabled />
              </td>
              <td class="td2">
                <el-input type="text" v-model="form.detailList[25].shijbh" @keydown.native="handleKeyDown($event, 13, 6)" :ref="'13_6'" />
              </td>
              <td class="td2">
                <el-input type="text" v-model="form.detailList[25].qvywz" @keydown.native="handleKeyDown($event, 13, 7)" :ref="'13_7'"/>
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[25].shichd1" @blur="calculatePingjz(25)" @keydown.native="handleKeyDown($event, 13, 8)" :ref="'13_8'"/>
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[25].shichd2" @blur="calculatePingjz(25)" @keydown.native="handleKeyDown($event, 13, 9)" :ref="'13_9'"/>
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[25].shichd3" @blur="calculatePingjz(25)" @keydown.native="handleKeyDown($event, 13, 10)" :ref="'13_10'"/>
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[25].shichd4" @blur="calculatePingjz(25)" @keydown.native="handleKeyDown($event, 13,11)" :ref="'13_11'"/>
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[25].pingjz" disabled />
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[25].pianc" disabled />
              </td>
            </tr>
            <tr height="25">
              <td class="td2">
                <el-input type="text" v-model="form.detailList[26].shijbh" @keydown.native="handleKeyDown($event, 14, 0)" :ref="'14_0'"/>
              </td>
              <td class="td2">
                <el-input type="text" v-model="form.detailList[26].qvywz"  @keydown.native="handleKeyDown($event, 14, 1)" :ref="'14_1'"/>
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[26].shichd1" @blur="calculatePingjz(26)"  @keydown.native="handleKeyDown($event, 14, 2)" :ref="'14_2'"/>
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[26].shichd2" @blur="calculatePingjz(26)"  @keydown.native="handleKeyDown($event, 14, 3)" :ref="'14_3'"/>
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[26].shichd3" @blur="calculatePingjz(26)"  @keydown.native="handleKeyDown($event, 14, 4)" :ref="'14_4'"/>
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[26].shichd4" @blur="calculatePingjz(26)"  @keydown.native="handleKeyDown($event, 14, 5)" :ref="'14_5'"/>
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[26].pingjz" disabled />
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[26].pianc" disabled />
              </td>
              <td class="td2">
                <el-input type="text" v-model="form.detailList[27].shijbh"  @keydown.native="handleKeyDown($event, 14, 6)" :ref="'14_6'"/>
              </td>
              <td class="td2">
                <el-input type="text" v-model="form.detailList[27].qvywz"  @keydown.native="handleKeyDown($event, 14,7)" :ref="'14_7'"/>
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[27].shichd1" @blur="calculatePingjz(27)"  @keydown.native="handleKeyDown($event, 14, 8)" :ref="'14_8'"/>
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[27].shichd2" @blur="calculatePingjz(27)"  @keydown.native="handleKeyDown($event, 14, 9)" :ref="'14_9'"/>
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[27].shichd3" @blur="calculatePingjz(27)"  @keydown.native="handleKeyDown($event, 14, 10)" :ref="'14_10'"/>
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[27].shichd4" @blur="calculatePingjz(27)" @keydown.native="handleKeyDown($event, 14, 11)" :ref="'14_11'"/>
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[27].pingjz" disabled />
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[27].pianc" disabled />
              </td>
            </tr>
            <tr height="25">
              <td class="td2">
                <el-input type="text" v-model="form.detailList[28].shijbh"  @keydown.native="handleKeyDown($event, 15, 0)" :ref="'15_0'"/>
              </td>
              <td class="td2">
                <el-input type="text" v-model="form.detailList[28].qvywz"   @keydown.native="handleKeyDown($event, 15, 1)" :ref="'15_1'"/>
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[28].shichd1" @blur="calculatePingjz(28)"   @keydown.native="handleKeyDown($event, 15, 2)" :ref="'15_2'"/>
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[28].shichd2" @blur="calculatePingjz(28)"   @keydown.native="handleKeyDown($event, 15, 3)" :ref="'15_3'"/>
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[28].shichd3" @blur="calculatePingjz(28)"   @keydown.native="handleKeyDown($event, 15, 4)" :ref="'15_4'"/>
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[28].shichd4" @blur="calculatePingjz(28)"   @keydown.native="handleKeyDown($event, 15, 5)" :ref="'15_5'"/>
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[28].pingjz" disabled />
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[28].pianc" disabled />
              </td>
              <td class="td2">
                <el-input type="text" v-model="form.detailList[29].shijbh"   @keydown.native="handleKeyDown($event, 15, 6)" :ref="'15_6'"/>
              </td>
              <td class="td2">
                <el-input type="text" v-model="form.detailList[29].qvywz"   @keydown.native="handleKeyDown($event, 15, 7)" :ref="'15_7'"/>
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[29].shichd1" @blur="calculatePingjz(29)"   @keydown.native="handleKeyDown($event, 15, 8)" :ref="'15_8'"/>
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[29].shichd2" @blur="calculatePingjz(29)"   @keydown.native="handleKeyDown($event, 15, 9)" :ref="'15_9'"/>
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[29].shichd3" @blur="calculatePingjz(29)"   @keydown.native="handleKeyDown($event, 15, 10)" :ref="'15_10'"/>
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[29].shichd4" @blur="calculatePingjz(29)"   @keydown.native="handleKeyDown($event, 15, 11)" :ref="'15_11'"/>
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[29].pingjz" disabled />
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[29].pianc" disabled />
              </td>
            </tr>
            <tr height="25">
              <td class="td2">
                <el-input type="text" v-model="form.detailList[30].shijbh"   @keydown.native="handleKeyDown($event, 16, 0)" :ref="'16_0'"/>
              </td>
              <td class="td2">
                <el-input type="text" v-model="form.detailList[30].qvywz"   @keydown.native="handleKeyDown($event, 16, 1)" :ref="'16_1'"/>
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[30].shichd1" @blur="calculatePingjz(30)"  @keydown.native="handleKeyDown($event, 16, 2)" :ref="'16_2'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[30].shichd2" @blur="calculatePingjz(30)"   @keydown.native="handleKeyDown($event, 16, 3)" :ref="'16_3'"/>
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[30].shichd3" @blur="calculatePingjz(30)"  @keydown.native="handleKeyDown($event, 16, 4)" :ref="'16_4'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[30].shichd4" @blur="calculatePingjz(30)"   @keydown.native="handleKeyDown($event, 16, 5)" :ref="'16_5'"/>
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[30].pingjz" disabled />
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[30].pianc" disabled />
              </td>
              <td class="td2">
                <el-input type="text" v-model="form.detailList[31].shijbh"  @keydown.native="handleKeyDown($event, 16, 6)" :ref="'16_6'" />
              </td>
              <td class="td2">
                <el-input type="text" v-model="form.detailList[31].qvywz"   @keydown.native="handleKeyDown($event, 16, 7)" :ref="'16_7'"/>
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[31].shichd1" @blur="calculatePingjz(31)"   @keydown.native="handleKeyDown($event, 16, 8)" :ref="'16_8'"/>
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[31].shichd2" @blur="calculatePingjz(31)"  @keydown.native="handleKeyDown($event, 16, 9)" :ref="'16_9'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[31].shichd3" @blur="calculatePingjz(31)"  @keydown.native="handleKeyDown($event, 16, 10)" :ref="'16_10'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[31].shichd4" @blur="calculatePingjz(31)"   @keydown.native="handleKeyDown($event, 16, 11)" :ref="'16_11'"/>
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[31].pingjz" disabled />
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[31].pianc" disabled />
              </td>
            </tr>
            <tr height="25">
              <td class="td2">
                <el-input type="text" v-model="form.detailList[32].shijbh"   @keydown.native="handleKeyDown($event, 17, 0)" :ref="'17_0'"/>
              </td>
              <td class="td2">
                <el-input type="text" v-model="form.detailList[32].qvywz"   @keydown.native="handleKeyDown($event, 17, 1)" :ref="'17_1'"/>
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[32].shichd1" @blur="calculatePingjz(32)"   @keydown.native="handleKeyDown($event, 17, 2)" :ref="'17_2'"/>
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[32].shichd2" @blur="calculatePingjz(32)"   @keydown.native="handleKeyDown($event, 17, 3)" :ref="'17_3'"/>
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[32].shichd3" @blur="calculatePingjz(32)"  @keydown.native="handleKeyDown($event, 17, 4)" :ref="'17_4'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[32].shichd4" @blur="calculatePingjz(32)"  @keydown.native="handleKeyDown($event, 17, 5)" :ref="'17_5'" />
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[32].pingjz" disabled />
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[32].pianc" disabled />
              </td>
              <td class="td2">
                <el-input type="text" v-model="form.detailList[33].shijbh"  @keydown.native="handleKeyDown($event, 17, 6)" :ref="'17_6'" />
              </td>
              <td class="td2">
                <el-input type="text" v-model="form.detailList[33].qvywz"   @keydown.native="handleKeyDown($event, 17, 7)" :ref="'17_7'"/>
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[33].shichd1" @blur="calculatePingjz(33)"  @keydown.native="handleKeyDown($event, 17, 8)" :ref="'17_8'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[33].shichd2" @blur="calculatePingjz(33)"   @keydown.native="handleKeyDown($event, 17, 9)" :ref="'17_9'"/>
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[33].shichd3" @blur="calculatePingjz(33)"  @keydown.native="handleKeyDown($event, 17, 10)" :ref="'17_10'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[33].shichd4" @blur="calculatePingjz(33)"  @keydown.native="handleKeyDown($event, 17, 11)" :ref="'17_11'" />
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[33].pingjz" disabled />
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[33].pianc" disabled />
              </td>
            </tr>
            <tr height="25">
              <td class="td2">
                <el-input type="text" v-model="form.detailList[34].shijbh"   @keydown.native="handleKeyDown($event, 18, 0)" :ref="'18_0'"/>
              </td>
              <td class="td2">
                <el-input type="text" v-model="form.detailList[34].qvywz"   @keydown.native="handleKeyDown($event, 18, 1)" :ref="'18_1'"/>
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[34].shichd1" @blur="calculatePingjz(34)"   @keydown.native="handleKeyDown($event, 18, 2)" :ref="'18_2'"/>
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[34].shichd2" @blur="calculatePingjz(34)"   @keydown.native="handleKeyDown($event, 18, 3)" :ref="'18_3'"/>
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[34].shichd3" @blur="calculatePingjz(34)"   @keydown.native="handleKeyDown($event, 18, 4)" :ref="'18_4'"/>
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[34].shichd4" @blur="calculatePingjz(34)"   @keydown.native="handleKeyDown($event, 18, 5)" :ref="'18_5'"/>
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[34].pingjz" disabled />
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[34].pianc" disabled />
              </td>
              <td class="td2">
                <el-input type="text" v-model="form.detailList[35].shijbh"   @keydown.native="handleKeyDown($event, 18, 6)" :ref="'18_6'"/>
              </td>
              <td class="td2">
                <el-input type="text" v-model="form.detailList[35].qvywz"   @keydown.native="handleKeyDown($event, 18, 7)" :ref="'18_7'"/>
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[35].shichd1" @blur="calculatePingjz(35)"   @keydown.native="handleKeyDown($event, 18, 8)" :ref="'18_8'"/>
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[35].shichd2" @blur="calculatePingjz(35)"  @keydown.native="handleKeyDown($event, 18, 9)" :ref="'18_9'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[35].shichd3" @blur="calculatePingjz(35)"  @keydown.native="handleKeyDown($event, 18, 10)" :ref="'18_10'" />
              </td>
              <td class="td1">
                <el-input type="number" v-model="form.detailList[35].shichd4" @blur="calculatePingjz(35)"  @keydown.native="handleKeyDown($event, 18, 11)" :ref="'18_11'" />
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[35].pingjz" disabled />
              </td>
              <td class="td1">
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.detailList[35].pianc" disabled />
              </td>
            </tr>
          </tbody>
        </table>
        <!-- .....................................................33333333333333333................................................... -->
        <table height="30px" class="bottom-table">
          <tr>
            <td>
              <span v-if="isPdf" class="textarea-span">{{ form.fujsm }}</span>
              <el-input v-else type="textarea" :rows="2" v-model="form.fujsm" @focus="handleFocus('fujsm')" />
            </td>
          </tr>
        </table>
      </div>
      <!-- .................................44444444444............................................. -->
      <table height="22px" class="transparent">
        <tbody>
          <tr>
            <td width="10%" align="right">检测：</td>
            <td width="15%" align="left"></td>
            <td width="10%" align="right">记录：</td>
            <td width="15%" align="left"></td>
            <td width="10%" align="right">复核：</td>
            <td align="left" width="15%"></td>
            <td class="td2">日期：</td>
            <td align="left" width="15%"></td>
          </tr>
        </tbody>
      </table>
    </div>
    <bs-instrument-view ref="bsInstrumentViewRef" @select="selectInstrument"></bs-instrument-view>
    <bs-jiancyj-view ref="bsJiancyjViewRef" @select="selectJiancyj" :syType="syType"></bs-jiancyj-view>
    <bs-judge-base-view ref="bsJudgeBaseViewRef" @select="selectJudge" :syType="syType"></bs-judge-base-view>
  </div>
</template>

<script>
import { getHdjlbBsInfo } from "@/api/report_ljlm/hdjlbBsInfo";
import BsInstrumentView from "@/views/dept/bsInstrument/BsInstrumentView.vue";
import BaQjDetailView from "@/views/sycs/baQjDetail/BaQjDetailView.vue";
import BsJiancyjView from "@/views/sycs/bsJiancyj/BsJiancyjView.vue";
import BsJudgeBaseView from "@/views/sycs/bsJudgeBase/BsJudgeBaseView.vue";

import decimal from "@/utils/big-decimal";
import { handleFocus, emptyConvert, calculateMeanvalue, handleKeyDown } from "@/views/reportForms/utils";
import Bus from "@/utils/bus";
export default {
  name: "hdjlb",
  components: {
    BsInstrumentView,
    BaQjDetailView,
    BsJiancyjView,
    BsJudgeBaseView
  },
  props: {
    excelId: {
      type: [String, Number],
      default: () => ""
    },
    syType: {
      type: [String, Number],
      default: () => ""
    },
    page: {
      type: Number,
      default: () => 0
    },
    isPdf: {
      type: Boolean,
      default: () => false
    },
    printEmpty: {
      type: Boolean,
      default: () => false
    }
  },
  data() {
    return {
      params: {},
      query: {},
      // 表单参数
      form: {
        detailList: [{}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}]
      }
    };
  },
  watch: {
    isPdf(newVal, oldVal) {
      this.form = { ...emptyConvert(this.form, newVal) };
    }
  },
  created() {
    this.getInfo();
  },
  mounted() {
    Bus.$on("setHdBgDataTop", (data) => {
      const { houdsjz, yunxpc } = data;
      this.form.houdsjz = houdsjz;
      this.form.yunxpc = yunxpc;
    });
  },
  beforeDestroy() {
    // 停止监听事件
    Bus.$off("setHdBgDataTop");
  },
  methods: {
    // 获取详情
    getInfo() {
      if (!this.excelId) {
        const { jiancdwmc, gongcmc } = this.$store.state.dept.deptInfo;
        this.form.jiancdwmc = jiancdwmc;
        this.form.gongcmc = gongcmc;
        this.form.fujsm = "附加声明：";
        return;
      }
      getHdjlbBsInfo(this.excelId).then((response) => {
        this.form = response.data;
        if (!this.form.fujsm) {
          this.form.fujsm = "附加声明：";
        }
      });
    },
    // 显示检测依据列表
    showBsJiancyjView() {
      this.$refs.bsJiancyjViewRef.init(this.form.jiancyjIds);
    },
    // 检测依据选择
    selectJiancyj(info) {
      this.form.jiancyj = info.label;
      this.form.jiancyjIds = info.ids;
      Bus.$emit("setHdBgJiancyj", { jiancyj: this.form.jiancyj, jiancyjIds: this.form.jiancyjIds });
    },
    // 显示判定依据列表
    showBsJudgeBaseView() {
      this.$refs.bsJudgeBaseViewRef.init(this.form.pandyjIds);
    },
    // 判断依据选择
    selectJudge(info) {
       this.form.pandyjIds = info.ids;
      this.form.pandyj = info.label;
    },
    // 显示仪器列表
    showBsInstrumentView() {
      this.$refs.bsInstrumentViewRef.init(this.form.shebIds);
    },
    // 仪器选择
    selectInstrument(info) {
      this.form.zhuyyqsbmcjbh = info.label;
      this.form.shebIds = info.ids;
      Bus.$emit("setHdBgZhuyyqsbmcjbh", { zhuyyqsbmcjbh: this.form.zhuyyqsbmcjbh, shebIds: this.form.shebIds });
    },
    // 计算平均值
    calculatePingjz(index) {
      let arr = [];
      for (let i = 1; i <= 4; i++) {
        const a = this.form.detailList[index]["shichd" + i];
        if (a) {
          arr.push(a);
        }
      }
      let pingjz = null;
      if (arr.length > 0) {
        pingjz = calculateMeanvalue(arr, 0);
      }
      this.form.detailList[index].pingjz = pingjz;
      // 计算偏差
      this.calculatePianc(index);
    },
    // 计算偏差
    calculatePianc(index) {
      const pingjz = this.form.detailList[index].pingjz;
      const houdsjz = this.form.houdsjz;
      let pianc = null;
      if (pingjz && houdsjz) {
        pianc = decimal.subtract(pingjz, houdsjz, 0);
      }
      this.form.detailList[index].pianc = pianc;
      this.setHdBgData();
    },
    // 设计值改变
    houdsjzChange() {
      this.form.detailList.forEach((item, index) => {
        this.calculatePianc(index);
      });
      this.setHdBgDataTop();
    },
    // 允许偏差改变
    yunxpcChange() {
      // 给报告传值
      this.setHdBgDataTop();
    },
    setHdBgData() {
      Bus.$emit("setHdBgData" + this.page, this.form.detailList);
    },
    setHdBgDataTop() {
      const info = {
        houdsjz: this.form.houdsjz,
        yunxpc: this.form.yunxpc
      };
      Bus.$emit("setHdBgDataTop", info);
    },
    submitForm() {
      return this.form;
    },
    handleFocus(event) {
      handleFocus(event, this.page, this.form[event]);
    },
    handleKeyDown(event, rowIndex, colIndex) {
      const maxArr = [1, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11];
      const ref = handleKeyDown(event, rowIndex, colIndex, maxArr);
      if (this.$refs[ref]) {
        this.$refs[ref].focus();
      }
    }
  }
};
</script>

<style scoped>
.td1 {
  width: calc(100% / 22 * 1);
}

.td2 {
  width: calc(8%);
}
</style>
